Solve the equation and check for extraneous roots